<template>
	<el-main>
		<div style="text-align: center;font-weight: 600;font-size: 16px">
			人事合同详情
		</div>
		<el-main>
		<el-form label-width="100px" size="mini">
			<el-form-item label="关联人员" prop="userId">{{form.userName}}</el-form-item>
			<el-form-item label="合同编号" prop="contractCode">{{form.contractCode}}</el-form-item>
			<el-form-item label="合同类型" prop="contractType">{{form.contractTypeName}}</el-form-item>
			<el-form-item label="签约方式" prop="signType">{{form.signTypeName}}</el-form-item>
			<el-form-item label="签约公司" prop="enterprise">{{form.enterprise}}</el-form-item>
			<el-form-item label="应聘岗位" prop="workJob">{{form.workJobName}}</el-form-item>
			<el-form-item label="合同生效时间" prop="startTime">{{form.startTime}}</el-form-item>
			<el-form-item label="合同终止时间" prop="endTime">{{form.endTime}}</el-form-item>
			<el-form-item label="合同期限属性" prop="specialization">{{form.specializationTypeName}}</el-form-item>
			<el-form-item label="合同签订时间" prop="signTime">{{form.signTime}}</el-form-item>
			<el-form-item label="合同备注">{{form.remark}}
			</el-form-item>
			<el-form-item label="合同附件" v-if="form.attachId!=''">
				<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true" ></attach-menu>
			</el-form-item>
		</el-form>
		</el-main>
	</el-main>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	name: 'Notice Details',
	components: {
		AttachMenu,
	},
	data() {
		return {
			form:{
				contractId:this.$route.query.contractId,
				contractCode: '',
				userName: '',
				contractTypeName: '',
				signTypeName:'',
				enterprise:'',
				workJobName:'',
				startTime: '',
				endTime: '',
				specializationTypeName:'',
				signTime:'',
				attachId:'',
				remark:''
			},
		}
	},
	mounted() {
		this.getHrContractById();
	},
	methods:{
		async getHrContractById()
		{
			let res = await this.$API.hr.hrContract.getHrContractById.get({contractId:this.form.contractId});
			{
				if(res.code==200)
				{
					this.form = res.data;
				}else
				{
					this.$alert(res.message, "提示", {type: 'error'})
				}
			}
		}

	}

}
</script>

<style>

</style>
